#ifndef PSD_PATH_H
#define PSD_PATH_H

#include "psd_session.h"
#include "psd_channel.h"

typedef struct psd_path_t {
	pthread_mutex_t lock;

	pthread_cond_t timeout_cond;

	int tag;

	char *description;

	LIST_HEAD(channellisthead, psd_channel_t) channel_list;

	int (*new_channel) (struct psd_path_t *path, uint16_t size, psdChannel **channel, char **ret_error_msg);
	int (*resize_channel) (struct psd_path_t *path, psdChannel *channel, uint16_t new_size, char **ret_error_msg);
	int (*close_channel) (struct psd_path_t *path, psdChannel *channel);

	void (*free) (struct psd_path_t *path);

	void *path_private;
} psdPath;

psdPath *psd_alloc_path();
void psd_free_path(psdPath *path);

#endif
